<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        .box{width:200px;height:200px;background: red;margin:50px;}
    </style>
</head>
<body>
    <div class="box"></div>
</body>
<script>

    var oBox = document.querySelector(".box");

    oBox.onclick = function(eve){
        var e = eve || window.event;
        console.log(e);
    }

    
    
</script>
</html>